//
//  RootViewController.m
//  self.LeftSlideView
//
//  Created by dllo on 15/12/8.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "RootViewController.h"
#import "AppDelegate.h"

@interface RootViewController ()

@end

@implementation RootViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationItem.title = @"抽屉";
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(leftAction)];
    self.view.backgroundColor = [UIColor redColor];
}
- (void)leftAction
{
    AppDelegate *tempApp = (AppDelegate *)[[UIApplication sharedApplication] delegate];
    if (tempApp.leftSlideVC.closed) {
        [tempApp.leftSlideVC openLeftView];
    } else {
        [tempApp.leftSlideVC closeLeftView];
    }
    
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
